using System.Collections;
using System.Collections.Generic;
using TMPro;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;

public class SetSaveDataName : BasePanel
{
    [SerializeField] private Button startButton;
    [SerializeField] private Button exitButton;
    [SerializeField] private TMP_InputField nameInputField;
    
    private void Start()
    {
        startButton.onClick.AddListener(StartGame);
        exitButton.onClick.AddListener(() => { UIManager.Instance.ClosePanel(UIConst.SETSAVEDATANAME);});
    }


    private void StartGame()
    {
        if(nameInputField.text == "")
            return;
        SaveManager.Instance.CreatGameData(nameInputField.text);
    }
}
